home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / stringsearch / bmsource / README < prev    next >
Encoding:
Text File  |  1991-05-06  |  1.5 KB  |  28 lines  |  [TEXT/MPS ]

  1.     This testing harness stuff supports two portability problems.
  2.  
  3. 1) how do you tell the time? This is solved in Posix but we don't have those
  4.     yet. Until then, you have to supply startclock/stopclock functions.
  5. 2) what is the fastest compiler? (or which compiler would you like to use?)
  6.     again, no common answer.
  7.  
  8.     So, you wanna port this to a new system? Easy. First, pick a new
  9. system name, say ``poot''. You have to create a Mk/poot which specifies the
  10. compiler and options of your choice. Set COPT to be a flag like -O
  11. and if you need weird flags (like -g or something), set CFLAGS. And of course,
  12. if needed, set CC. These are all parts of a makefile.
  13.  
  14.     secondly, create a sys/poot.c, most likely by copying an existing
  15. such file. all it does is define startclock and stopclock and an integer ``hz''.
  16. stopclock has to return the number of ticks since startclock was called.
  17. there are hz ticks per second. For various unsatisfactory reasons, you also
  18. have to define a double ``tcmp''; set it to 3.3 unless you know better.
  19.  
  20.     that's it. now, executing ``runall poot'' will generate a timing
  21. run. if you accumulate a bunch, say 3 or 4, of these timing outputs,
  22. the shell script ``ave.times'' will convert them into a summarised form
  23. (which regrettably is only of much use to me). I would certainly
  24. appreciate getting such output, together with some details about the system.
  25.  
  26.     As always, I would also appreciate hearing about suggestions
  27. and bugs, preferably by email to andrew@research.att.com.
  28.